(function(K) {
	
var Assert = YAHOO.util.Assert;

function getDependencies(callback) {
    K.classLoader().
    requires("tk.k90tools.lang.String").
    load(function(I) { callback(I); });
}
    
K.classLoader(K.data("testConfig").basePath).
provides("tk.k90tools.lang.StringTest").
load(function(I) {
    
    return function() {
        var test = new YAHOO.tool.TestCase({
            name : "tk.k90tools.lang.StringTest",
            
            testContains : function() {
            	getDependencies(function(I) {
                    test.resume(function() {
                        var content = "content";
                        
                        Assert.isTrue(I.String.contains(content, "e"));
                        Assert.isFalse(I.String.contains(content, "a"));
                    });            		
            	});
            	this.wait();
            },
            
            testUcFirst : function() {
                getDependencies(function(I) {
                    test.resume(function() {
                        var content = "content";
                        Assert.areEqual("Content", I.String.ucFirst(content));
                    });
                });
                this.wait();
            },
            
            testTrim : function() {
                getDependencies(function(I) {
                    test.resume(function() {
                        var content = "   content   ";
                        Assert.areEqual("content", I.String.trim(content));
                    });
                });
                this.wait();            	
            },
            
            testStartsWith : function() {
                getDependencies(function(I) {
                    test.resume(function() {
                        var content = "content";
                        Assert.isTrue(I.String.startsWith(content, "con"));
                        Assert.isFalse(I.String.startsWith(content, "on"));
                    });
                });
                this.wait();            	
            },
            
            testEndsWith : function() {
                getDependencies(function(I) {
                    test.resume(function() {
                        var content = "content";
                        Assert.isTrue(I.String.endsWith(content, "ent"));
                        Assert.isFalse(I.String.endsWith(content, "conten"));
                    });
                });
                this.wait();                
            },
            
            testEqualsIgnoreCase : function() {
                getDependencies(function(I) {
                    test.resume(function() {
                        Assert.isTrue(I.String.equalsIgnoreCase("content", "Content"));
                    });
                });
                this.wait();                     	
            }
            
            
        });
        
        return test;
    }
});

})(k90tools);